Lowest Common Ancestor(LCA)

نویسنده

  • Fayssal El Moufatich
چکیده

Before embarking into the technicalities of the different algorithms for LCA, let us first agree on the terminology that we will be using throughout this article. Let there be a rooted tree T(E,V). A node x ∈ T is called an ancestor of a node y ∈ T if the path from the root of T to y goes through x. Also, a node v ∈ T is called to be a common ancestor of x and y if it is an ancestor of both x and y. Hence, the Nearest/Lowest Common Ancestor, NCA or LCA, of two nodes x, y is the common ancestor of x and y whose distance to x (and to y) smaller than the distance to x of any common ancestor of x and y. From now on, we denote the NCA of two nodes x and y from the tree T as nca(x, y). As we have already pointed out, efficiently computing NCAs has been studied extensively for the last 3 decades in both online and offline settings.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Computing Lowest Common Ancestors in Directed Acyclic Graphs

Finding the lowest common ancestor of a given pair of nodes is a fundamental algorithmic problem. In this paper we study the lowest common ancestor(LCA) problem on directed acyclic graphs (DAGs). A lowest common ancestor of two nodes a and b is a node c which is a common ancestor of a and b and no other node is both a common ancestor of a and b and a proper descendant of c. LCA on trees have be...

متن کامل

Fast Lowest Common Ancestor Computations in Dags

This work studies lowest common ancestor problems in directed acyclic graphs. We present fast algorithms for solving the All-Pairs Representative LCA and AllPairs All LCA problems with expected running time of O(n2 log n) and O(n3 log log n) respectively. The speed-ups over recently developed methods are achieved by applying transitive reduction on the input dags. The algorithms are experimenta...

متن کامل

All-pairs disjoint paths from a common ancestor in Õ(n) time

A common ancestor of two vertices u, v in a directed acyclic graph is a vertex w that can reach both. A {u, v}-junction is a common ancestor w so that there are two paths, one from w to u and the other from w to v, that are internally vertex-disjoint. A lowest common ancestor (LCA) of u and v is a common ancestor w so that no other common ancestor of u and v is reachable from w. Every {u, v}-LC...

متن کامل

Schema-Independence in XML Keyword Search

XML keyword search has attracted a lot of interests with typical search based on lowest common ancestor (LCA). However, in this paper, we show that meaningful answers can be found beyond LCA and should be independent from schema designs of the same data content. Therefore, we propose a new semantics, called CR (Common Relative), which not only can find more answers beyond LCA, but the returned ...

متن کامل

.1 Range Minimum Query (rmq) 1.2 Lowest Common Ancestor (lca)

We care not only about the value of the minimum element, but also about the index k of the minimum element between A[i] and A[j]; given the index, it is easy to look up the actual value of the minimum element, so it is a more interesting problem to find the index of the minimum element between A[i] and A[j]. The range minimum query problem is not a tree problem, but it closely related to a tree...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2008